package prime;
import java.util.InputMismatchException;
import java.util.Scanner;
public class Test {
    public static void main(String[] args) {
        try {
            System.out.print("请输入一个整数:");
            Prime prime = new Prime();
            Scanner scan = new Scanner(System.in);
            int i = scan.nextInt();
            float f = scan.nextFloat();
            String str = scan.nextLine();
            prime.setNum(scan.nextInt());
            if (prime.isPrime()) {
                System.out.println("是素数");
            } else {
                System.out.println("不是素数");
            }
        } catch (InputMismatchException e) {
            System.out.println("非整数错误");
        }
    }
}
